package com.zzyang.aop.demo.rpc.consumer;


import com.zzyang.aop.demo.rpc.User;
import com.zzyang.aop.demo.rpc.UserService;
import com.zzyang.aop.demo.rpc.anno.MyReference;
import org.springframework.stereotype.Service;

/**
 * TODO
 *
 * @author zhuoziyang
 * @date 2021/5/19 22:07
 */
@Service
public class Consumer {

    @MyReference(url = "localhost:9527")
    private UserService userService;

    public void say(String name){
        System.out.println(userService.say(name));
    }

    public void getName(User user){
        System.out.println(userService.getName(user));
    }

    public void getName(String name ,User user){
        System.out.println(userService.getName(name,user));
    }

    public void getName(){
        System.out.println(userService.getName());
    }

}
